//package com.zpz.framework.zpzoauth.config.exception;//package com.auyan.demo.web.config;
//import com.zpz.framework.zpzoauth.common.result.ResultMsg;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.web.bind.annotation.RestControllerAdvice;
//
//import javax.servlet.http.HttpServletRequest;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
///* @作者: zhangpanzhi
// * @创建日期: 2018年4月12日 上午11:36:12
// * @修改人:
// * @修改日期:
// * @修改原因描述:
// */
//@RestControllerAdvice
//public class ExceptionConfig {
//    private Logger log = LoggerFactory.getLogger(ExceptionConfig.class);
//
//    @ExceptionHandler(value = Exception.class)
//    public Object defaultHandler(HttpServletRequest req, Exception e){
//        //application/json
//        String contentType = req.getContentType();
//        log.error(e.getMessage(),e);
//        /*JSONObject object = new JSONObject();
//        object.put("code","500");
//        object.put("msg",e.getMessage());*/
//        return ResultMsg.error();
//    }
//}
